<!DOCTYPE html>
<html lang="en" ng-app="myApp">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="../css/bootstrap.min.css" />
</head>

<body ng-controller="myController">

    <h1>{{helloModel}}</h1>

    <p>{{arrs}}</p>
    <ul>
        <li ng-repeat="item in arrs">{{item}}</li>
    </ul>
    <p ng-repeat="user in userList">{{user.id}} - {{user.name}} {{$index}}
        <button ng-click="delUser($index)">删除</button>
        <button ng-click="getUser($index)">编辑</button>
    </p>

    <table class="table">

        <tr ng-repeat="user in userList">
            <td>{{user.id}}</td>
            <td>{{user.name}}</td>
            <td>{{user.age}}</td>
            <td>
                <button class="btn btn-primary" ng-click="delUser($index)">删除</button>
                <button class="btn" ng-click="getUser($index)">编辑</button>
            </td>
        </tr>

    </table>

    id:
    <input type="text" ng-model="user.id">
    </br>
    name:
    <input type="text" ng-model="user.name">
    </br>
    age:
    <input type="text" ng-model="user.age">
    </br>
    <button ng-click="addUser()">添加</button>
    
    <script src="../js/angular.min.js"></script>
    <script src="../js/service.js"></script>
    <script type="text/javascript" src="../js/demo.js"></script>
</body>

</html>